<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            margin: 30px auto;
        }
        #box1{
            background-color: rgb(255, 0,0);
            opacity: 0.5;
        }
        #box2{
            background-color:rgb(255, 0,0);
            opacity:.5;
        }
        h1{
            background-color: green;
            cursor:pointer; 
            }
        .c2{
            opacity: 0.5;
        }
    </style>
</head>
<body>
    <div id="box1">
        <h1>box1->一级标题</h1>
    </div>
    <div id="box2">
        <h1 class="c2">box2->一级标题</h1>

    </div>
</body>
</html>